#!/usr/bin/env python
# -*- coding: utf-8 -*-


class TemplateMgr:
    def __init__(self, app, session):
        self.app = app
        self.session = session
        self.templates = {
            "templates":[
                {
                    "id": 111111, 
                    "name": "基础UI测试模板", 
                    "description": "用于基本UI元素测试的模板", 
                    "category": "UI测试",
                },
                {
                    "id": 222222, 
                    "name": "性能测试模板", 
                    "description": "用于应用性能测试的模板", 
                    "category": "性能测试",
                },
                {
                    "id": 3, 
                    "name": "兼容性测试模板", 
                    "description": "用于多设备兼容性测试的模板", 
                    "category": "兼容性测试",
                },
            ],
        }
        self.app.logger.warning(f'{self.__class__}: method __init__() is empty')


    def destroy(self):
        self.session = None
        self.app = None
        


    def __del__(self):
        self.destroy()


    def get_templates(self):
        return { "code": 200, "content": self.templates }